import React,{useContext} from 'react';
import { useNavigate } from 'react-router-dom';

import { Context } from '../../reducer';

const Index = () => {
    const [state,dispatch] = useContext(Context);
    const navigate = useNavigate()
    return (
        <div>
            home
            <hr />
            <button onClick={()=>navigate('/city')}>{state.city}</button>
        </div>
    );
}

export default Index;
